package com.one.oa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;



@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user_detail")
public class UserDetail {
    /**
    *序号，主键 */
     @TableId(type = IdType.AUTO)
    private Integer id;
    /**
    *会员d */
    private Integer uid;
    /**
    *头像 */
    private String imgurl;
    /**
    *性别 */
    private Integer sex;
    /**
    *生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    /**
    *简介 */
    private String info;
    /**
    *创建时间 */
    private Date createTime;

    public UserDetail(Integer uid) {
        this.uid = uid;
        this.createTime = new Date();
    }
}
